<template>
  <div style="font-size: 25px; font-weight: bold; margin-bottom: 10px">
    咨询师
  </div>
<el-row :gutter="12">
  <el-col :md="8" v-for="item in consultant">
    <id-card style="margin-bottom: 15px"  :nickName="item.nickName" :summary="item.summary" :email="item.email" :phone="item.phone" :conId="item.id"></id-card>
  </el-col>
</el-row>
</template>

<script>
import {onBeforeMount, reactive, toRefs} from "vue";
import {consultant} from "@/api/user";
import IdCard from "@/components/idCard";

export default {
  name: "advisory",
  components: {IdCard},
  setup(){
    const data = reactive({
      consultant: []
    })

    onBeforeMount(() => {
      consultant().then(res => {
        data.consultant = res.data
      })
    })
    return {
      ...toRefs(data)
    }
  }
}
</script>

<style scoped>

</style>
